<?php
define('MAGIC_QUOTES_GPC', get_magic_quotes_gpc());
define('ROOT',dirname(__FILE__).'/');

if (isset($_REQUEST['GLOBALS']) || isset($_FILES['GLOBALS'])) exit('Variable "GLOBALS" overwrite attempted.');

require_once ROOT.'./Base/Model.class.inc.php';
require_once ROOT.'./Base/request.class.inc.php';
require_once ROOT.'./Base/Controller.class.inc.php';
require_once ROOT.'./Base/skyIo.class.inc.php';
require_once ROOT.'./config/gloabel.configs.inc.php';
require_once ROOT.'./Base/SysCrypt.class.inc.php';
require_once ROOT.'./application/models/admin_model.class.inc.php'; 

if(!MAGIC_QUOTES_GPC){
	$_COOKIE && $_COOKIE = request::addslashes($_COOKIE);
	$_GET && $_GET = request::addcslashes($_GET);
	$_POST && $_POST = request::addcslashes($_POST);
}

if(PHP_VERSION > 5.1){
	$date =& $_config['date'];
	date_default_timezone_set('Etc/GMT'.($date['timeoffset']>0?'-':'+').abs($date['timeoffset']));
	unset($date);
}

require_once ROOT.'./Base/skySession.class.inc.php';
$skysess = new skySession();
$model = new Model();   //init skySession

require_once ROOT.'./Base/url.class.inc.php';
$url = new url();
$url->getUrl_pathinfo();  //init Url

//function __autoLoad($classname){
//	if(file_exists($classpath = ROOT.'./Base/'.$classname.'.class.inc.php')) 
//	require_once $classpath;
//	else if(file_exists($appcpath = ROOT.'./application/controllers/'.$classname.'_control.php'))
//	require_once $appcpath;
//	else if(file_exists($appmpath = ROOT.'./application/models/'.$classname.'_model.class.inc.php'))
//	require_once $appmpath;
//	else die('can\'t find '.$classname.' in this application!!!! please check your code again');
//}

?>
